; ORIGINAL: 3dt2.1/examples/line.scm
; $Id: line.scm,v 1.5 1998/09/29 16:06:43 jmb Exp $
;- line.scm -------------------------------------------------------
; Create a line by rubber banding.
; (line) calls the procedure.
; rubber banding starts at the first click position,
; rubber banding stops at the second click position.
; The new entity is returned.
;------------------------------------------------------------------
(define line
  (lambda ()
    (let ((start-pos (pick:position (read-ray))))
      (begin
        (rbd:line #t start-pos)
        (let ((end-pos (pick:position (read-ray))))
           (begin
             (rbd:remove-type rbd:line?)
             (edge:linear start-pos end-pos)
           )
        )
      )
    )
  )
)

